﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace CommonTagTime
{
    public static class clsConfigData
    {
        public static int DEFAULT_ADMIN_PAGE_SIZE
        {
            get
            {
                int result = 0;
                try
                {
                    result = clsConvert.Int(ConfigurationManager.AppSettings["AdminPageSize"].ToString());
                }
                catch
                { }
                if (result < 1)
                    result = 10;
                return result;
            }
        }

        public static int DEFAULT_PRODUCT_PAGE_SIZE
        {
            get
            {
                int result = 0;
                try
                {
                    result =clsConvert.Int(ConfigurationManager.AppSettings["ProductPageSize"].ToString());
                }
                catch
                { }
                if (result < 1)
                    result = 10;
                return result;
            }
        }
        public static int DEFAULT_SHOP_PAGE_SIZE
        {
            get
            {
                int result = 0;
                try
                {
                    result = clsConvert.Int(ConfigurationManager.AppSettings["ShopPageSize"].ToString());
                }
                catch
                { }
                if (result < 1)
                    result = 10;
                return result;
            }
        }
        public static int DEFAULT_MSDS_PAGE_SIZE
        {
            get
            {
                int result = 0;
                try
                {
                    result = clsConvert.Int(ConfigurationManager.AppSettings["MSDSPageSize"].ToString());
                }
                catch
                { }
                if (result < 1)
                    result = 10;
                return result;
            }
        }
        public static int DEFAULT_NEWEVENTS_PAGE_SIZE
        {
            get
            {
                int result = 0;
                try
                {
                    result = clsConvert.Int(ConfigurationManager.AppSettings["NewPageSize"].ToString());
                }
                catch
                { }
                if (result < 1)
                    result = 10;
                return result;
            }
        }
        public static int DEFAULT_STEPBYSTEP_PAGE_SIZE
        {
            get
            {
                int result = 0;
                try
                {
                    result = clsConvert.Int(ConfigurationManager.AppSettings["StepPageSize"].ToString());
                }
                catch
                { }
                if (result < 1)
                    result = 10;
                return result;
            }
        }
        public static int DEFAULT_VIDEO_PAGE_SIZE
        {
            get
            {
                int result = 0;
                try
                {
                    result = clsConvert.Int(ConfigurationManager.AppSettings["VideoPageSize"].ToString());
                }
                catch
                { }
                if (result < 1)
                    result = 10;
                return result;
            }
        }
        public static string DEFAULT_MAIL_SERVER
        {
            get
            {
                string result = string.Empty;
                try
                {
                    result = ConfigurationManager.AppSettings["EmailServer"].ToString();
                }
                catch
                { }
                return result;
            }
        }
        public static string DEFAULT_MAIL_FROM
        {
            get
            {
                string result = string.Empty;
                try
                {
                    result = ConfigurationManager.AppSettings["SystemEmail"].ToString();
                }
                catch
                { }
                return result;
            }
        }
        public static int DEFAULT_MAIL_TIMEOUT
        {
            get
            {
                int result = 1000;
                try
                {
                    result = clsConvert.Int(ConfigurationManager.AppSettings["MailServerTimeout"].ToString());
                }
                catch
                { }
                if (result <= 0)
                    result = 1000;
                return result;
            }
        }
        public static int CacheDuration
        {
            get
            {
                int result = 1000;
                try
                {
                    result = clsConvert.Int(ConfigurationManager.AppSettings["cacheDuration"].ToString());
                }
                catch
                { }
                if (result <= 0)
                    result = 300;
                return result;
            }
        }
        public static string DEFAULT_UPLOAD_LOGO_DUOI
        {
            get
            {
                string result = string.Empty;
                try
                {
                    result = ConfigurationManager.AppSettings["LogoDuoi"].ToString();
                }
                catch
                {
                    result = DEFAULT_UPLOAD_LOGO_DUOI_FOLDER;
                }
                return result;
            }
        }
        public static string DEFAULT_UPLOAD_DOCUMENT_FOLDER = "upload/Document/";
        public static string DEFAULT_UPLOAD_DOCUMENT_THUMB_FOLDER = "/upload/Document/thumb/";
        public static string DEFAULT_UPLOAD_DOCUMENT_LARGE_FOLDER = "/upload/Document/large/";
        public static string DEFAULT_UPLOAD_DOCUMENT_SMALL_FOLDER = "/upload/Document/small/";
        public static string DEFAULT_UPLOAD_DOCUMENT_IMAGES_FOLDER = "/upload/Document/image/";
        public static string DEFAULT_UPLOAD_TIPNEW_FOLDER = "upload/TipNews/";
        public static string DEFAULT_UPLOAD_LOGO_DUOI_FOLDER = "upload/LogoDuoi/";
        public static string DEFAULT_UPLOAD_BANNER_FOLDER = "upload/Banner/";
        public static string DEFAULT_UPLOAD_TIPNEW_THUMBIMAGE_FOLDER = "upload/TipNews/ThumbImage/";
        public static string DEFAULT_UPLOAD_LOGO_THUMBIMAGE_FOLDER = "upload/Logo/ThumbImage/";
        public static string DEFAULT_UPLOAD_LOGO_FOLDER = "upload/Logo/";

        public static string DEFAULT_UPLOAD_PRODUCT_FOLDER = "/upload/Product/";
        public static string DEFAULT_UPLOAD_PRODUCT_IMAGES_FOLDER = "/upload/Product/image/";
        public static string DEFAULT_UPLOAD_PRODUCT_THUMB_FOLDER = "/upload/Product/thumb/";
        public static string DEFAULT_UPLOAD_PRODUCT_LARGE_FOLDER = "/upload/Product/large/";
        public static string DEFAULT_UPLOAD_PRODUCT_SMALL_FOLDER = "/upload/Product/small/";
        public static string DEFAULT_UPLOAD_PRODUCT_FEATURED_FOLDER = "/upload/Product/featured/";
        public static string DEFAULT_UPLOAD_PRODUCT_THUMBL_NOIMAGE = "/upload/noimages/productThumbNoimage.gif";
        public static string DEFAULT_UPLOAD_PRODUCT_LARGE_NOIMAGE = "/upload/noimages/productLargeNoimage.jpg";
        public static string DEFAULT_UPLOAD_PRODUCT_NOIMAGE = "/upload/noimages/productNoimage.gif";
        public static string DEFAULT_UPLOAD_TIP_NOIMAGE = "/upload/noimages/TipNoImage.gif";
        public static string DEFAULT_UPLOAD_NEWEVENTS_NOIMAGE = "/upload/noimages/NewEventNoImage.jpg";
        public static string DEFAULT_CUSTOMER_US_COUNTRY_CODE = "US";
        public static string DEFAULT_MAIL_TEMPLATE_REGISTER_DISTRIBUTOR_CUSTOMER = "MailTemplate/ClientRegisterDistributor.txt";
        public static string DEFAULT_MAIL_TEMPLATE_REGISTER_DISTRIBUTOR_ADMIN = "MailTemplate/AdminRegisterDistributor.txt";
        public static string DEFAULT_MAIL_TEMPLATE_CONTACT_US = "MailTemplate/ContactUs.txt";
        public static string DEFAULT_MAIL_TEMPLATE_RECOVERY_PASS = "MailTemplate/RecoveryPass.txt";
    }
}
